<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /* 子元素float,父元素的高度会坍塌
        如何让父元素的高度回来 
         overflow:hidden;
         */
         /* 一般子元素folat的情况下 要给他套一个父元素加上 overflow:hidden;
         以免对其他元素造成干扰 */
        .parent{
            width:300px;
            background: red;
            /* height:200px; */
            overflow:hidden;
        }
        .child{
            width:100px;    
            height:200px;
            float:left;
            background:blue;
        }
        .two{
            width:100px;
            height:100px;
            background: #333;

        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="child"></div>
    </div>
    <div class="two"></div>
    
</body>
</html>